<?php $i=0;?>
<?php if(!empty($dataVideo)): ?>
<div id="type_3" <?php echo ($mode==3 ? '':'class="hidden"');?>>
	<?php foreach($dataVideo as $value):?>
		<div class="isVideoItem<?php $i++; echo ($i%4 == 0)? ' last' : ''; ?>">
			<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
				<div class="thumb">
					<?php echo exec_image(array(
						'folder' => 'video',
						'dimension' => '140x90',
						'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
						'alt' => ''.@$value->video_name.'',	
						'title' => ''.@$value->video_name.''	
						)
					);?>
				</div>
			</a>
			<div class="title">
				<?php if($value->video_type_id == 1):?>
					<a title="add to playlist" class="_playlist" target="_blank" href="<?php echo $playlist_url.'video/'.$value->video_id.'-'.seo_url($value->video_name);?>"></a>
				<?php endif;?>
				<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
					<?php echo $value->video_name;?>
				</a>
			</div>
			<div class="artist">
				<?php if(!empty($value->artist)) foreach($value->artist as $key => $artist):?>
					<?php echo ($key==0 ? '':'/');?>
					<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" title="<?php echo $artist->artist_name;?>" target="_blank"><?php echo $artist->artist_name;?></a>
				<?php endforeach;?>
			</div>
			<div class="view">จำนวนที่ดู <?php echo $value->views;?> ครั้ง</div>
		</div>
	<?php endforeach;?>
	<div class="clearfix"></div>
</div>

<div id="type_2" <?php echo ($mode==2 ? '':'class="hidden"');?>>
	<?php foreach($dataVideo as $value):?>
	<div class="isVideo2">
		<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
		<div class="thumb">
			<?php echo exec_image(array(
						'folder' => 'video',
						'dimension' => '117x75',
						'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
						'alt' => ''.@$value->video_name.'',	
						'title' => ''.@$value->video_name.''	
						)
			);?>
		</div>
		</a>
		<div class="desc">
			<div class="title">
				<?php if($value->video_type_id == 1):?>
					<a title="add to playlist" class="_playlist" target="_blank" href="<?php echo $playlist_url.'video/'.$value->video_id.'-'.seo_url($value->video_name);?>"></a>
				<?php endif;?>
				<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
					<?php echo $value->video_name;?>
				</a>
			</div>
			<div class="artist">
				<?php if(!empty($value->artist)) foreach($value->artist as $key => $artist):?>
					<?php echo ($key==0 ? '':'/');?>
					<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" title="<?php echo $artist->artist_name;?>" target="_blank"><?php echo $artist->artist_name;?></a>
				<?php endforeach;?>
			</div>
			<div class="view">จำนวนที่ดู <?php echo $value->views;?> ครั้ง</div>
		</div>
	</div>
	<?php endforeach;?>
	<div class="clearfix"></div>
</div>

<div id="type_1" <?php echo ($mode==1 ? '':'class="hidden"');?>>
	<ul>
	<?php foreach($dataVideo as $value):?>
		<li class="isVideo3">
		<?php if($value->video_type_id == 1):?>
			<a title="add to playlist" class="_playlist" target="_blank" href="<?php echo $playlist_url.'video/'.$value->video_id.'-'.seo_url($value->video_name);?>"></a>
		<?php endif;?>
		<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
			<?php echo $value->video_name;?>
		</a>
		<div class="artist">
			<?php if(!empty($value->artist)) foreach($value->artist as $key => $artist):?>
				<?php echo ($key==0 ? '':'/');?>
				<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" title="<?php echo $artist->artist_name;?>" target="_blank"><?php echo $artist->artist_name;?></a>
			<?php endforeach;?>
		</div>
		</li>
	<?php endforeach;?>
	</ul>
</div>

<?php endif;?>

<div class="pager">
	<?php if(!empty($pager)) echo $pager;?>
</div>